home *** CD-ROM | disk | FTP | other *** search
-
-
-
- MMMMPPPPOOOOOOOOLLLL((((3333)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((JJJJuuuunnnneeee 4444,,,, 1111999999993333)))) MMMMPPPPOOOOOOOOLLLL((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- mpool - shared memory buffer pool
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ddddbbbb....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<mmmmppppoooooooollll....hhhh>>>>
-
- MMMMPPPPOOOOOOOOLLLL ****
- mmmmppppoooooooollll____ooooppppeeeennnn ((((DDDDBBBBTTTT ****kkkkeeeeyyyy,,,, iiiinnnntttt ffffdddd,,,, ppppggggnnnnoooo____tttt ppppaaaaggggeeeessssiiiizzzzeeee,,,, ppppggggnnnnoooo____tttt mmmmaaaaxxxxccccaaaacccchhhheeee))));;;;
-
- vvvvooooiiiidddd
- mmmmppppoooooooollll____ffffiiiilllltttteeeerrrr ((((MMMMPPPPOOOOOOOOLLLL ****mmmmpppp,,,, vvvvooooiiiidddd ((((****ppppggggiiiinnnn))))((((vvvvooooiiiidddd ****,,,, ppppggggnnnnoooo____tttt,,,, vvvvooooiiiidddd ****)))),,,,
- vvvvooooiiiidddd ((((****ppppggggoooouuuutttt))))((((vvvvooooiiiidddd ****,,,, ppppggggnnnnoooo____tttt,,,, vvvvooooiiiidddd ****)))),,,, vvvvooooiiiidddd ****ppppggggccccooooooookkkkiiiieeee))));;;;
-
- vvvvooooiiiidddd ****
- mmmmppppoooooooollll____nnnneeeewwww ((((MMMMPPPPOOOOOOOOLLLL ****mmmmpppp,,,, ppppggggnnnnoooo____tttt ****ppppggggnnnnooooaaaaddddddddrrrr))));;;;
-
- vvvvooooiiiidddd ****
- mmmmppppoooooooollll____ggggeeeetttt ((((MMMMPPPPOOOOOOOOLLLL ****mmmmpppp,,,, ppppggggnnnnoooo____tttt ppppggggnnnnoooo,,,, uuuu____iiiinnnntttt ffffllllaaaaggggssss))));;;;
-
- iiiinnnntttt
- mmmmppppoooooooollll____ppppuuuutttt ((((MMMMPPPPOOOOOOOOLLLL ****mmmmpppp,,,, vvvvooooiiiidddd ****ppppggggaaaaddddddddrrrr,,,, uuuu____iiiinnnntttt ffffllllaaaaggggssss))));;;;
-
- iiiinnnntttt
- mmmmppppoooooooollll____ssssyyyynnnncccc ((((MMMMPPPPOOOOOOOOLLLL ****mmmmpppp))));;;;
-
- iiiinnnntttt
- mmmmppppoooooooollll____cccclllloooosssseeee ((((MMMMPPPPOOOOOOOOLLLL ****mmmmpppp))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _M_p_o_o_l is the library interface intended to provide page
- oriented buffer management of files. The buffers may be
- shared between processes.
-
- The function _m_p_o_o_l__o_p_e_n initializes a memory pool. The _k_e_y
- argument is the byte string used to negotiate between
- multiple processes wishing to share buffers. If the file
- buffers are mapped in shared memory, all processes using the
- same key will share the buffers. If _k_e_y is NULL, the
- buffers are mapped into private memory. The _f_d argument is
- a file descriptor for the underlying file, which must be
- seekable. If _k_e_y is non-NULL and matches a file already
- being mapped, the _f_d argument is ignored.
-
- The _p_a_g_e_s_i_z_e argument is the size, in bytes, of the pages
- into which the file is broken up. The _m_a_x_c_a_c_h_e argument is
- the maximum number of pages from the underlying file to
- cache at any one time. This value is not relative to the
- number of processes which share a file's buffers, but will
- be the largest value specified by any of the processes
- sharing the file.
-
-
-
-
- Page 1 (printed 4/30/98)
-
-
-
-
-
-
- MMMMPPPPOOOOOOOOLLLL((((3333)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((JJJJuuuunnnneeee 4444,,,, 1111999999993333)))) MMMMPPPPOOOOOOOOLLLL((((3333))))
-
-
-
- The _m_p_o_o_l__f_i_l_t_e_r function is intended to make transparent
- input and output processing of the pages possible. If the
- _p_g_i_n function is specified, it is called each time a buffer
- is read into the memory pool from the backing file. If the
- _p_g_o_u_t function is specified, it is called each time a buffer
- is written into the backing file. Both functions are are
- called with the _p_g_c_o_o_k_i_e pointer, the page number and a
- pointer to the page to being read or written.
-
- The function _m_p_o_o_l__n_e_w takes an MPOOL pointer and an address
- as arguments. If a new page can be allocated, a pointer to
- the page is returned and the page number is stored into the
- _p_g_n_o_a_d_d_r address. Otherwise, NULL is returned and errno is
- set.
-
- The function _m_p_o_o_l__g_e_t takes a MPOOL pointer and a page
- number as arguments. If the page exists, a pointer to the
- page is returned. Otherwise, NULL is returned and errno is
- set. The flags parameter is not currently used.
-
- The function _m_p_o_o_l__p_u_t unpins the page referenced by _p_g_a_d_d_r.
- _P_g_a_d_d_r must be an address previously returned by _m_p_o_o_l__g_e_t
- or _m_p_o_o_l__n_e_w. The flag value is specified by _o_r'ing any of
- the following values:
-
- MPOOL_DIRTY
- The page has been modified and needs to be written to
- the backing file.
-
- _M_p_o_o_l__p_u_t returns 0 on success and -1 if an error occurs.
-
- The function _m_p_o_o_l__s_y_n_c writes all modified pages associated
- with the MPOOL pointer to the backing file. _M_p_o_o_l__s_y_n_c
- returns 0 on success and -1 if an error occurs.
-
- The _m_p_o_o_l__c_l_o_s_e function free's up any allocated memory
- associated with the memory pool cookie. Modified pages are
- nnnnooootttt written to the backing file. _M_p_o_o_l__c_l_o_s_e returns 0 on
- success and -1 if an error occurs.
-
- EEEERRRRRRRROOOORRRRSSSS
- The _m_p_o_o_l__o_p_e_n function may fail and set _e_r_r_n_o for any of
- the errors specified for the library routine _m_a_l_l_o_c(3).
-
- The _m_p_o_o_l__g_e_t function may fail and set _e_r_r_n_o for the
- following:
-
- [EINVAL] The requested record doesn't exist.
-
- The _m_p_o_o_l__n_e_w and _m_p_o_o_l__g_e_t functions may fail and set _e_r_r_n_o
- for any of the errors specified for the library routines
- _r_e_a_d(2), _w_r_i_t_e(2), and _m_a_l_l_o_c(3).
-
-
-
- Page 2 (printed 4/30/98)
-
-
-
-
-
-
- MMMMPPPPOOOOOOOOLLLL((((3333)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((JJJJuuuunnnneeee 4444,,,, 1111999999993333)))) MMMMPPPPOOOOOOOOLLLL((((3333))))
-
-
-
- The _m_p_o_o_l__s_y_n_c function may fail and set _e_r_r_n_o for any of
- the errors specified for the library routine _w_r_i_t_e(2).
-
- The _m_p_o_o_l__c_l_o_s_e function may fail and set _e_r_r_n_o for any of
- the errors specified for the library routine _f_r_e_e(3).
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- _d_b_o_p_e_n(3), _b_t_r_e_e(3), _h_a_s_h(3), _r_e_c_n_o(3)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 3 (printed 4/30/98)
-
-
-
-